/*    */ package com.zimbra.cs.redolog.op;
/*    */ 
/*    */ import com.zimbra.cs.mailbox.Mailbox;
/*    */ import com.zimbra.cs.mailbox.MailboxManager;
/*    */ import com.zimbra.cs.mailbox.MailboxOperation;
/*    */ import com.zimbra.cs.redolog.RedoLogInput;
/*    */ import com.zimbra.cs.redolog.RedoLogOutput;
/*    */ import java.io.IOException;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class RefreshMountpoint
/*    */   extends RedoableOp
/*    */ {
/*    */   private int mId;
/*    */   private String mOwnerId;
/*    */   private int mRemoteId;
/*    */   
/*    */   public RefreshMountpoint()
/*    */   {
/* 34 */     super(MailboxOperation.RefreshMountpoint);
/* 35 */     this.mId = 0;
/*    */   }
/*    */   
/*    */   public RefreshMountpoint(int mailboxId, int mptId, String ownerId, int remoteId) {
/* 39 */     this();
/* 40 */     setMailboxId(mailboxId);
/* 41 */     this.mId = mptId;
/* 42 */     this.mOwnerId = ownerId;
/* 43 */     this.mRemoteId = remoteId;
/*    */   }
/*    */   
/*    */   public void redo() throws Exception
/*    */   {
/* 48 */     int mboxId = getMailboxId();
/* 49 */     Mailbox mailbox = MailboxManager.getInstance().getMailboxById(mboxId);
/* 50 */     mailbox.refreshMountpoint(getOperationContext(), this.mId, this.mOwnerId, this.mRemoteId);
/*    */   }
/*    */   
/*    */   protected String getPrintableData()
/*    */   {
/* 55 */     StringBuilder sb = new StringBuilder("id=").append(this.mId);
/* 56 */     sb.append(", owner=").append(this.mOwnerId).append(", remoteId=").append(this.mRemoteId);
/* 57 */     return sb.toString();
/*    */   }
/*    */   
/*    */   protected void serializeData(RedoLogOutput out) throws IOException
/*    */   {
/* 62 */     out.writeInt(this.mId);
/* 63 */     out.writeUTF(this.mOwnerId);
/* 64 */     out.writeInt(this.mRemoteId);
/*    */   }
/*    */   
/*    */   protected void deserializeData(RedoLogInput in) throws IOException
/*    */   {
/* 69 */     this.mId = in.readInt();
/* 70 */     this.mOwnerId = in.readUTF();
/* 71 */     this.mRemoteId = in.readInt();
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/redolog/op/RefreshMountpoint.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */